FROM {{ namespace }}/{{ image_prefix }}vitrage-base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}

{% block vitrage_graph_header %}{% endblock %}

{% import "macros.j2" as macros with context %}

{% if install_type == 'binary' %}

    {% if base_package_type == 'rpm' %}

        {% set vitrage_graph_packages = [
            'openstack-vitrage-graph'
        ] %}

{{ macros.install_packages(vitrage_graph_packages | customizable("packages")) }}

    {% elif base_package_type == 'deb' %}
    {% if base_distro == 'debian' %}

        {% set vitrage_graph_packages = [
            'vitrage-graph'
        ] %}

{{ macros.install_packages(vitrage_graph_packages | customizable("packages")) }}

    {% else %}

RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
    && /bin/false

    {% endif %}
    {% endif %}

{% endif %}

{% block vitrage_graph_footer %}{% endblock %}
{% block footer %}{% endblock %}

USER vitrage
